#include <vector>
#include <iostream>
#include <string>  

#define STRINGIFY_HELPER(x) #x
#define STRINGIFY(x) STRINGIFY_HELPER(x)
#define ToStr  STRINGIFY 
#define EnumToString STRINGIFY

enum class A 
{
    SPRING = 0,SUMMER,AUTUMN,WINTER,
};

enum class B 
{
    DEBUG = 0, INFO, WARNING, ERROR, FATAL
};

auto EnumAToString(int var)->std::string;
auto test1()->void;

int main(int argc, char const* argv[])
{
    test1();

    return 0;
}


auto EnumAToString(int var)-> std::string
{
    A variable{ var };
    switch (variable)
    {
    case A::SPRING: return STRINGIFY(A::SPRING);
    case A::SUMMER: return STRINGIFY(A::SUMMER);
    case A::AUTUMN: return STRINGIFY(A::AUTUMN);
    case A::WINTER: return STRINGIFY(A::WINTER);
    default:        return "";
    }
}

auto test1()->void
{
    std::cout << "enum: " << (int)A::AUTUMN << "-" << STRINGIFY(A::AUTUMN) << std::endl;
    std::cout << "enum: " << (int)B::DEBUG << "-" << STRINGIFY(B::DEBUG) << std::endl;
    for (auto n = 0; n <= 4; n++)
    {
        std::cout << "enum: " << n << "-" << EnumAToString(n) << std::endl;
    }
}
